package com.daxia.test.wx;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;

import org.apache.commons.lang3.StringUtils;

public class Delete {
	
	public static void main(String[] args) throws Exception {
		BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("/Users/kevin/Desktop/所有图片.txt")));
		String line = null;
		Set<String> set = new HashSet<String>();
		while ((line = reader.readLine()) != null) {
			line = line.trim();
			if (StringUtils.isBlank(line)) {
				continue;
			}
			String[] arr = line.split(",");
			for (String string : arr) {
				set.add(string.trim());
			}
		}
		reader.close();
		
		FileWriter writer = new FileWriter(new File("/Users/kevin/Desktop/所有图片2.txt"));
		for (String string : set) {
			writer.write(string + "\n");
		}
		writer.close();
	}
}
